<!--{template meta}-->
<style>
body{margin-top:0px;}</style>
<!--{template searchinput}-->
     <!--{eval $hotwords=$this->fromcache('hotwords');}-->
       <!--{if $hotwords}-->
 <div class="hotsearchword">
    <h2>问答热搜</h2>
    <div class="word">
    
       <!--{loop $hotwords $index $word}-->
       {if $index<=1}
        <span><a href="{url question/search/$word['w']}"><i class="icon_hot"></i>$word['w']</a></span>
        {else}
          <span><a href="{url question/search/$word['w']}">$word['w']</a></span>
          {/if}
         <!--{/loop}-->
    </div>
</div>
       <!--{/if}-->
<div class="search_history">
    <h2>搜索历史</h2>
  

</div>
<!--清除搜索历史-->
<div class="weui-flex trashword">
    <div> <i class="icon_trash"></i></div>
    <div class="weui-flex__item" onclick="clearall()">
        清除搜索记录
    </div>
</div>

 
  
<script>

function clearall(){
    window.localStorage.clear();
    loadword();
}
$('.ui-searchbar-wrap').addClass('focus');
$('.ui-searchbar-input input').focus();
loadword();
</script>
